<template>
<div class="tabbar">
    <div :class="{active:index==currentIndex}" @click="$emit('deliverIndex',index)" v-for="(item,index) in tabberList" :key="index">{{item}}
    </div>
</div>
</template>

<script>
export default {
    props: {
        tabberList: { type: Array, default: [] },
        currentIndex:{type:Number,default:0}
 }
}
</script>

<style lang="scss" scoped>
.tabbar {
    display: flex;
    justify-content: space-evenly;
    position: fixed;
    bottom: 0;
    border-top: 1px solid black;
    width: 100%;
    height: 40px;
    background-color: white;
}

.tabbar div {
    line-height: 40px;
}

.active {
    color: aqua;
}
</style>